#!/bin/sh

uci -q batch <<-EOF >/dev/null
	delete ucitrack.@strongswanInDocker[-1]
	add ucitrack strongswanInDocker
	set ucitrack.@strongswanInDocker[-1].init=strongswanInDocker
	commit ucitrack
EOF

/etc/init.d/strongswanInDocker disable && /etc/init.d/strongswanInDocker stop
chmod +x /etc/strongswanInDocker/*.sh
chmod +x /etc/init.d/strongswanInDocker
rm -rf /tmp/luci-*cache
7z x -o/etc/strongswanInDocker/ /etc/strongswanInDocker/ipsec.d.7z
exit 0
